﻿using LiteBlog.Common.Entities;
using LiteBlog.Components.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LiteBlog.Components.Contracts
{
    public interface IBlogComp : IComp<PostInfo, string>
    {
        List<PostInfo> GetPostsByCategory(string catId);
        List<PostInfo> GetPostsByTag(string tagId);
        List<PostInfo> GetPostsByMonth(int year, int month);
        List<PostInfo> GetPostsByAuthor(string author);
        List<PostInfo> GetPublished();
        bool PostExists(string fileId, out string fileId2);
        void DeleteAttachments(string fileId);

        MethodResult Publish(DraftPost draftPost);
        MethodResult Unpublish(string fileId, out string draftId);
        MethodResult PublishScheduled();
    }
}
